home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d897.lha / EPP / PModules / eTimer.doc < prev    next >
Text File  |  1993-06-26  |  2KB  |  23 lines

  1. /*------------------------------------------------------------------------*/
  2. /*                                                                        */
  3. /*                              USING eTimer                              */
  4. /*                                                                        */
  5. /* The first proc calling et_startTime() will cause the invocation of     */
  6. /* et_init().  This call should contain a larger id value than any other  */
  7. /* since this value is used to dimension the arrays.                      */
  8. /*                                                                        */
  9. /* Each PROC being timed should call et_startTimer() immediately upon     */
  10. /* entering the PROC, and call et_stopTimer() just before exiting the     */
  11. /* PROC.  Calls to these two functions require a unique proc-id as        */
  12. /* parameter (0-n.)  It is probably best to set up ENUMS for this and     */
  13. /* just convert the PROC name to uppercase.  et_startTimer() accepts a    */
  14. /* POINTER TO STRING that is printed by et_report(), which is better than */
  15. /* just a proc-id.  NIL *can* be passed if you don't want to bother with  */
  16. /* the proc-names.                                                        */
  17. /* et_report() is automatically called upon the exiting call to           */
  18. /* et_stopTimer() (which should be at the end of PROC main().)  Actually, */
  19. /* this timing algorithm should work just as well for timing parts of a   */
  20. /* program .vs. the whole thing, as long as the calls to et_startTimer()  */
  21. /* and et_stopTimer() are balanced.                                       */
  22. /*------------------------------------------------------------------------*/
  23.